/**
* Vote.js
*
* @description :: TODO: You might write a short summary of how this model works and what it represents here.
* @docs        :: http://sailsjs.org/#!documentation/models
*/

module.exports = {

	attributes: {

		quiz: {
			model: 'quiz',
			required: true
		},

		responses: {
			collection: 'response',
			via: 'vote'
		},

		activeQuestion : {
			type: 'integer'
		},

		//set as default for now - later this will be an option when launching the quiz
		voteType : {
			type: 'string',
		},

		userId : {
			type: 'integer',
			required: true
		},

		//settings from vote instance launch page

		hasTimeLimit: {
			type: 'boolean',
			required: true
		},
		
		timeLimit : {
			type: 'integer'
		},

		displayResults : {
			type: 'boolean',
			required: true
		},

		displaySocial : {
			type: 'boolean',
			required: true
		},

		showAnswers : {
			type: 'boolean',
			required: true
		},

		hasDeadline: {
			type: 'boolean',
			required: true
		},

		activeTimeStart: {
			type: 'date',
		},

		activeTimeEnd: {
			type: 'date'
		},

		requireLogin : {
			type: 'string',
			required: true
		},

		
	}

};

